.pg-table-wrapper {

  &.borderless {
    border-bottom: 1px solid #ddd;
  }

  & .loading-box {
    margin-top: 10px;
    height: 30px;
    line-height: 30px;
    text-align: center;
  }

  .fixed-header {
    position: fixed;
    top: 50px;
    left: 220px;
    width: calc(100% - 240px);
    min-width: 1040px;
    z-index: 99;
    background: #fcfcfc;
    box-shadow: 0 0 2px 0 rgba(0,0,0,0.1);
  }
}

.pg-table {
  width: 100%;
  table-layout: fixed;
  thead {
    color: #666;
    font-size: $font-size-base;
    font-weight: 700;
    margin-right: 0;
    width: 100%;
    border-bottom: 1px solid #ddd;

    tr {
      height: 50px;
      border-bottom: 1px solid #DDDDDD;
    }

    th {
      padding: 20px 10px 10px;
    }
  }

  tbody {

    & > tr {
      line-height: $line-height-base;
      border-bottom: 1px solid #DDDDDD;

      &:hover:not(.selected):not(.expand-row) {
        background-color: #f2f2f2 !important;
      }

      &.selected {
        background-color: #eaf5ea !important;
      }

      transition: background-color .2s ease-in-out;

      &.expandable {
        background-color: #f9f9f9;
      }

      .pg-expand-icon {

        &.active {
          transform: rotate(90deg);
        }
      }
    }

    td {
      font-size: $font-size-base;
      padding: 12px 10px;
      word-break: break-all;
      border-bottom: 1px solid #ddd;
    }
  }

}

.pg-table.borderless {
  thead {
    border-bottom: none;
    tr {
      border-bottom: none;
    }
  }

  tbody {
    tr {
      border-bottom: none;
    }
    tr:nth-child(2n + 1) {
      background: #F9F9F9;
    }
    td {
      border-bottom: none;
    }
  }
}


.pg-table-empty {
  width: 100%;
  display: flex;
  justify-content: center;
  font-size: $font-size-base;
  height: 42px;
  line-height: 42px;
  background-color: #F9F9F9;
}

.pg-column-sort {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  margin-top: -1px;
  cursor: pointer;

  .icon-arrow-up5,
  .icon-arrow-down5 {
    color: $secondary;
    transition: color .2s ease-in-out;
  }

  .active {
    color: $primary !important;
  }

  .icon-arrow-down5 {
    margin-top: -10px;
  }
}
